module ProfileHelper
  # Return the user's profile URL.
  def profile_for(user)
    profile_url(:screen_name => user.screen_name)
  end

  # Return true if hiding the edit links for spec, FAQ, etc.
  def hide_edit_links?
    not @hide_edit_links.nil?
  end

  def is_friendship(user, friend)
    if (user.nil? && friend.nil?)
      return true 
    end
    friendship = Friendship.find_by_user_id_and_friend_id(user, friend)
    if friendship.nil?  
      return true
    end
    case friendship.status
    when 'accepted'
      return true
    else
    return false
    end
  end
end
